<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Polkit-0.116
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;4.&nbsp;Security
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="p11-kit.html" title=
          "p11-kit-0.23.20">Prev</a>
          <p>
            p11-kit-0.23.20
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="shadow.html" title="Shadow-4.8.1">Next</a>
          <p>
            Shadow-4.8.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="security.html" title=
          "Chapter&nbsp;4.&nbsp;Security">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="polkit" name="polkit"></a>Polkit-0.116
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Polkit
        </h2>
        <p>
          <span class="application">Polkit</span> is a toolkit for defining
          and handling authorizations. It is used for allowing unprivileged
          processes to communicate with privileged processes.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://www.freedesktop.org/software/polkit/releases/polkit-0.116.tar.gz">
                https://www.freedesktop.org/software/polkit/releases/polkit-0.116.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 4b37258583393e83069a0e2e89c0162a
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 1.5 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 15 MB (with tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.4 SBU (with tests)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Additional Downloads
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Recommended patch: <a class="ulink" href=
                "http://www.linuxfromscratch.org/patches/blfs/9.1/polkit-0.116-fix_elogind_detection-1.patch">
                http://www.linuxfromscratch.org/patches/blfs/9.1/polkit-0.116-fix_elogind_detection-1.patch</a>
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Polkit Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="../general/glib2.html" title=
          "GLib-2.62.4">GLib-2.62.4</a> and <a class="xref" href=
          "../general/js60.html" title="JS-60.8.0">js60-60.8.0</a>
        </p>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="linux-pam.html" title=
          "Linux-PAM-1.3.1">Linux-PAM-1.3.1</a> <span class="phrase">and
          <a class="xref" href="../general/elogind.html" title=
          "elogind-243.4">elogind-243.4</a></span>
        </p>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            Since <span class="phrase"><span class=
            "command"><strong>elogind</strong></span></span> uses PAM to
            register user sessions, it is a good idea to build <span class=
            "application">Polkit</span> with PAM support so <span class=
            "phrase"><span class=
            "command"><strong>elogind</strong></span></span> can track
            <span class="application">Polkit</span> sessions.
          </p>
        </div>
        <h4>
          Optional (Required if building GNOME)
        </h4>
        <p class="optional">
          <a class="xref" href="../general/gobject-introspection.html" title=
          "gobject-introspection-1.62.0">gobject-introspection-1.62.0</a>
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="xref" href="../pst/docbook.html" title=
          "docbook-xml-4.5">docbook-xml-4.5</a>, <a class="xref" href=
          "../pst/docbook-xsl.html" title=
          "docbook-xsl-nons-1.79.2">docbook-xsl-1.79.2</a>, <a class="xref"
          href="../general/gtk-doc.html" title=
          "GTK-Doc-1.32">GTK-Doc-1.32</a>, and <a class="xref" href=
          "../general/libxslt.html" title="libxslt-1.1.34">libxslt-1.1.34</a>
        </p>
        <h4>
          <a id="polkit-agent" name="polkit-agent"></a> Optional Runtime
          Dependencies
        </h4>
        <p class="optional">
          One polkit authentication agent for using polkit in the graphical
          environment: <span class="application">polkit-kde-agent</span> in
          <a class="xref" href="../kde/plasma-all.html" title=
          "Building Plasma 5">Plasma-5.18.1</a> for KDE, the agent built in
          <a class="xref" href="../gnome/gnome-shell.html" title=
          "gnome-shell-3.34.4">gnome-shell-3.34.4</a> for GNOME3, <a class=
          "xref" href="../gnome/polkit-gnome.html" title=
          "polkit-gnome-0.105">polkit-gnome-0.105</a> for XFCE, and
          <span class="application">lxpolkit</span> in <a class="xref" href=
          "../lxde/lxsession.html" title=
          "LXSession-0.5.4">LXSession-0.5.4</a> for LXDE.
        </p>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            If <a class="xref" href="../general/libxslt.html" title=
            "libxslt-1.1.34">libxslt-1.1.34</a> is installed, then <a class=
            "xref" href="../pst/docbook.html" title=
            "docbook-xml-4.5">docbook-xml-4.5</a> and <a class="xref" href=
            "../pst/docbook-xsl.html" title=
            "docbook-xsl-nons-1.79.2">docbook-xsl-1.79.2</a> are required. If
            you have installed <a class="xref" href="../general/libxslt.html"
            title="libxslt-1.1.34">libxslt-1.1.34</a>, but you do not want to
            install any of the DocBook packages mentioned, you will need to
            use <code class="option">--disable-man-pages</code> in the
            instructions below.
          </p>
        </div>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/polkit">http://wiki.linuxfromscratch.org/blfs/wiki/polkit</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Polkit
        </h2>
        <p>
          There should be a dedicated user and group to take control of the
          <span class="command"><strong>polkitd</strong></span> daemon after
          it is started. Issue the following commands as the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">groupadd -fg 27 polkitd &amp;&amp;
useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
        -g polkitd -s /bin/false polkitd</kbd>
</pre>
        <p>
          Fix an issue introduced in recent <span class=
          "application">Polkit</span> realeases with elogind:
        </p>
        <pre class="userinput">
<kbd class=
"command">patch -Np1 -i ../polkit-0.116-fix_elogind_detection-1.patch &amp;&amp;
autoreconf -fi</kbd>
</pre>
        <p>
          Install <span class="application">Polkit</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --localstatedir=/var \
            --disable-static     \
            --with-os-type=LFS   \
            --enable-libsystemd-login=no &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span>. Note that system <span class=
          "application">D-Bus</span> daemon must be running for the testsuite
          to complete.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <code class="option">--with-authfw=shadow</code>: This switch
          enables the package to use the <span class=
          "application">Shadow</span> rather than the <span class=
          "application">Linux PAM</span> Authentication framework. Use it if
          you have not installed <span class="application">Linux PAM</span>.
        </p>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
        <p>
          <code class="option">--enable-gtk-doc</code>: Use this parameter if
          <span class="application">GTK-Doc</span> is installed and you wish
          to rebuild and install the API documentation.
        </p>
        <p>
          <em class=
          "parameter"><code>--enable-libsystemd-login=no</code></em>: This
          switch forces polkit to build with elogind support (if available)
          rather than systemd.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring Polkit
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm45779283890032" name="idm45779283890032"></a>PAM
            Configuration
          </h4>
          <div class="admon note">
            <img alt="[Note]" src="../images/note.png" />
            <h3>
              Note
            </h3>
            <p>
              If you did not build <span class="application">Polkit</span>
              with <span class="application">Linux PAM</span> support, you
              can skip this section.
            </p>
          </div>
          <p>
            If you have built <span class="application">Polkit</span> with
            <span class="application">Linux PAM</span> support, you need to
            modify the default PAM configuration file which was installed by
            default to get <span class="application">Polkit</span> to work
            correctly with BLFS. Issue the following commands as the
            <code class="systemitem">root</code> user to create the
            configuration file for <span class="application">Linux
            PAM</span>:
          </p>
          <pre class="root">
<kbd class="command">cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
<code class="literal"># Begin /etc/pam.d/polkit-1

auth     include        system-auth
account  include        system-account
password include        system-password
session  include        system-session

# End /etc/pam.d/polkit-1</code>
EOF</kbd>
</pre>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">pkaction, pkcheck, pk-example-frobnicate,
              pkexec, pkttyagent and polkitd</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">libpolkit-agent-1.so and
              libpolkit-gobject-1.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/etc/polkit-1, /usr/include/polkit-1,
              /usr/lib/polkit-1, /usr/share/gtk-doc/html/polkit-1 and
              /usr/share/polkit-1</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="pkaction" name="pkaction"></a><span class=
                    "term"><span class=
                    "command"><strong>pkaction</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to obtain information about registered PolicyKit
                    actions.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pkcheck" name="pkcheck"></a><span class=
                    "term"><span class=
                    "command"><strong>pkcheck</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to check whether a process is authorized for
                    action.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pk-example-frobnicate" name=
                    "pk-example-frobnicate"></a><span class=
                    "term"><span class=
                    "command"><strong>pk-example-frobnicate</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is an example program to test the <span class=
                    "command"><strong>pkexec</strong></span> command.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pkexec" name="pkexec"></a><span class=
                    "term"><span class=
                    "command"><strong>pkexec</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    allows an authorized user to execute a command as another
                    user.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pkttyagent" name="pkttyagent"></a><span class=
                    "term"><span class=
                    "command"><strong>pkttyagent</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to start a textual authentication agent for the
                    subject.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="polkitd" name="polkitd"></a><span class=
                    "term"><span class=
                    "command"><strong>polkitd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    provides the org.freedesktop.PolicyKit1 <span class=
                    "application">D-Bus</span> service on the system message
                    bus.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libpolkit-agent-1" name=
                    "libpolkit-agent-1"></a><span class="term"><code class=
                    "filename">libpolkit-agent-1.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the <span class="application">Polkit</span>
                    authentication agent API functions.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libpolkit-gobject-1" name=
                    "libpolkit-gobject-1"></a><span class="term"><code class=
                    "filename">libpolkit-gobject-1.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the <span class="application">Polkit</span>
                    authorization API functions.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-17 12:12:55 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="p11-kit.html" title=
          "p11-kit-0.23.20">Prev</a>
          <p>
            p11-kit-0.23.20
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="shadow.html" title="Shadow-4.8.1">Next</a>
          <p>
            Shadow-4.8.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="security.html" title=
          "Chapter&nbsp;4.&nbsp;Security">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
